<%--
  Created by IntelliJ IDEA.
  User: 无敌大鼻涕泡
  Date: 2021/6/18
  Time: 17:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加门禁卡信息</title>
</head>
<body>
<form method="post" action="CardMybatisServlet?opr=add">
    <table border="1">
        <tr>
            <td colspan="2">
                <h2>添加门禁卡信息</h2>
            </td>
        </tr>
        <tr>
            <td>持卡人姓名(*)</td>
            <td><input type="text" name="userName" id="userName"/></td>
        </tr>
        <tr>
            <td>持卡人身份证号(*)</td>
            <td><input type="text" name="idNumber" id="idNumber"/></td>
        </tr>
        <tr>
            <td>办卡日期(*)</td>
            <td><input type="text" name="createDate" id="createDate"/></td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <input type="submit" value="提交" id="sub"/>
            </td>
        </tr>
    </table>
</form>
<script src="js/jquery-1.12.4.js"></script>
<script>
    $("#sub").click(function () {
        var userName = $("#userName").val();
        var idNumber = $("#idNumber").val();
        var createDate = $("#createDate").val();
        if (userName == "" || idNumber == "" || createDate == "") {
            alert("请填写完整信息");
            return false;
        }
    })
</script>
</body>
</html>
